function run_exog_test_NHTS(y_min,y_max,sigma_berkson,K1,K2,trim_perc_q,input_directory,output_directory,fileID)

		%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		% SET SEED 
		%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	 
	rng(1234);
	
		%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		% INITIALIZE 
		%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	 
	tau=0.5;
	mat_type='chebyshev';
	range_extend=sigma_berkson; 
	h_factor_w=1;
	berkson_txt='base';
	factor_berkson=1;
	unit_TT=0;
	Berkson_estimated=0;
	K3=NaN;
	k_type='bi';
	order_V_Ln=50; 

	berkson_off=0;
	if sigma_berkson==0
		berkson_off=1;
	end

		%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		% LOAD DATA 
		%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	 
	[data,config]=berk_ml.load_data(mat_type,range_extend,K1,K2,K3,trim_perc_q,y_min,y_max,berkson_txt,factor_berkson,berkson_off,Berkson_estimated,unit_TT,input_directory,output_directory);

	a1=min(data.p);
	b1=max(data.p);
	a2=min(data.q);
	b2=max(data.q);
	a3=min(data.y);
	b3=max(data.y);
	N=size(data.p,1);

	p_lb=min(data.p)-range_extend;
	p_ub=max(data.p)+range_extend;
	q_lb=a2;
	q_ub=b2;

	h_w=silverman_rule(data.w,'bi');
	h_w=h_factor_w*h_w;

		%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		% ESTIMATE 
		%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	 
	estimates=berk_ml.estimate_noY(data,config,sigma_berkson);
	
		%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		% EXOGENEITY TEST
		%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	 
	[tstat_n,c2_crit95,reject2,pval2] = exog_test_tstat(data.p,data.q,data.w,K1,K2, ...
			a1,a2,b1,b2,p_lb,p_ub,q_lb,q_ub,tau,N,estimates.theta_hat,sigma_berkson,h_w,k_type, ...
			order_V_Ln);
	
	fprintf(fileID,'sigma_berk=%7.4f, ymin=%8.0f, ymax=%8.0f, tstat_n=%10.7f, c_crit95=%10.7f, rej=%1.0f, pval=%6.4f, N=%5.0f.\n',sigma_berkson,y_min,y_max,tstat_n,c2_crit95,reject2,pval2,N);

	%
